/*----------------------------------------------------------------------------*/

#include <stdio.h>
#include <syslog.h>
#include "log.h"

/*
The syslog() function sends a message to an implementation-dependent logging 
facility, which may log it in an implementation-dependent system log, write it 
to the system console, forward it to a list of users, or forward it to the 
logging facility on another host over the network. The logged message includes 
a message header and a message body. The message header contains at least a  
timestamp and a tag string.
*/

/*----------------------------------------------------------------------------*/

int useLog;

/*----------------------------------------------------------------------------*/

int
logOpen(const char *text)
{
	if( useLog == LOG_YES )
		/*openlog(text, LOG_CONS | LOG_PID, LOG_USER);*/
		;
	return LOG_OK;
}

/*----------------------------------------------------------------------------*/

int
logEvent(const char * text)
{
	if( useLog == LOG_YES )
		/*syslog(0?1:LOG_NOTICE,text);*/
		fprintf(stderr,"%s\n",text);
	return LOG_OK;
}

/*----------------------------------------------------------------------------*/

int
logClose(void)
{
	if( useLog == LOG_YES )
		/*closelog();*/
		;
	return LOG_OK;
}
